<?php
/**
增加管理员
 */
session_start();

if (empty($_SESSION['admin_name'])){
    echo "尚未登录,请先登录";
    echo "<br/>"."<a href='login.php'>登录</a>";
    exit();
}

?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    <link rel="stylesheet" type="text/css" href="css/base.css" />
    <link rel="stylesheet" type="text/css" href="css/top.css" />
    <link rel="stylesheet" type="text/css" href="css/right.css" />
    <link rel="stylesheet" type="text/css" href="css/left.css" />
</head>
<body>
<div id="container">
    <div id="top">
        <div id="top_left">
            <span>博客管理系统</span>
        </div>
        <div id="top_right">
            欢迎你：<?php echo $_SESSION['admin_name'] ?> <a href="logout.php">退出登录</a>
        </div>
    </div>
    <div id="left">
        <ul>
            <li><a href="#">分类管理</a></li>
            <li><a href="#">文章管理</a></li>
            <li><a href="#" id="left_one">管理员</a></li>
        </ul>
    </div>
    <div id="right">
        <ul>
            <li>
                <a href="#">首页</a>&nbsp;>
                <a href="#">管理员操作</a>&nbsp;>
                <a href="#">增加管理员</a>
            </li>
            <li>
                <form id="admin_add_form" action="admin_add_save.php" method="post">
                    <table class="add">
                        <tbody>
                        <tr>
                            <td>管理员名称:&nbsp;</td>
                            <td>
                                <input type="text" name="admin_name"/>
                            </td>
                        </tr>
                        <tr>
                            <td>管理员邮箱:&nbsp;</td>
                            <td>
                                <input type="text" name="admin_email"/>
                            </td>
                        </tr>
                        <tr>
                            <td>管理员密码:&nbsp;</td>
                            <td>
                                <input type="password" name="admin_password"/>
                            </td>
                        </tr>
                        <tr>
                            <td>再确认密码:&nbsp;</td>
                            <td>
                                <input type="password" name="confirm_password"/>
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>
                                <input type="submit" class="button" />
                                <input type="reset" class="button" />
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </form>
            </li>
        </ul>
    </div>
</div>
</body>
</html>

